﻿using CommonLib;
using CommonLib.Pattern.Pool;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ReusableRoleMinusItem : ReusableObject, IInitByInstruction
{
	RolePlusEffectItem rolePlusEffect;

	public void Init(BPInstruction instruction)
	{
		rolePlusEffect.Init(instruction);
	}

	protected override GameObject CreateSelf()
	{
		GameObject prefab = GameResourceLoader.Instance.LoadFromResource<GameObject>("ReusableObject/EffectScorePlusMinus");
		//base.CreateSelf();
		IsCreated = true;
		rolePlusEffect = Instantiate(prefab).GetComponent<RolePlusEffectItem>();
		rolePlusEffect.EndAction += (self) =>
		{
			this.UnUse();
		};
		return rolePlusEffect.gameObject;
	}

}
